import { reactive } from "vue";
interface Data {
  /** 名称 */
  name: string;
  /** 年龄 */
  age: number;
}

/** 初始化响应数据 */
const useSayhiSetup = (props: any) => {
  const data: Data = reactive({
    name: "liwang",
    age: 18
  });
  /** 修改名称 */
  const updateName = () => data.name = "liuliu";
  /** 修改年龄 */
  const updateAge = () => data.age++;
  return {
    data,
    updateName,
    updateAge
  };
};
export default useSayhiSetup

